package com.rybbaby.tss.platform.sysFormAttrDictionary.service.imp;

import com.rybbaby.tss.core.web.service.imp.BaseServiceImp;
import com.rybbaby.tss.platform.sysFormAttrDictionary.entity.SysFormAttrDictionary;
import com.rybbaby.tss.platform.sysFormAttrDictionary.initializer.SysFormAttrDictionaryInitializer;
import com.rybbaby.tss.platform.sysFormAttrDictionary.service.ISysFormAttrDictionaryService;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * @description 表单属性字典Service接口实现
 *
 * @author 谢进伟
 *
 * @createDate 2016年2月26日 下午6:27:20
 */
@Service
public class SysFormAttrDictionaryServiceImp extends BaseServiceImp<SysFormAttrDictionary> implements ISysFormAttrDictionaryService {
	
	@Override
	public Serializable save(SysFormAttrDictionary entity) {
		Serializable id = super.save(entity);
		if(id != null) {
			entity.setId(id.toString());
		}
		return id;
	}
	
	@Override
	public void saveOrUpdate(SysFormAttrDictionary entity) {
		super.saveOrUpdate(entity);
		SysFormAttrDictionaryInitializer.loadAllFormAttr();
	}
	
	@Override
	public void delete(SysFormAttrDictionary entity) {
		super.delete(entity);
	}
	
	@Override
	public void deleteEntityById(Serializable id) {
		super.deleteEntityById(id);
	}
	
	@Override
	public void updateEntitiy(SysFormAttrDictionary entity) {
		super.updateEntitiy(entity);
	}
}
